package lab03.test01;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;

/**
 * Created by Administrator on 2017/11/16.
 */
public class Text01 {
    public static void main(String[] args) throws IOException {
        //  写文件-字符流
        String path="E:\\Hello.txt";
        BufferedWriter writer = null;
        try {
            writer=new BufferedWriter(new FileWriter(path));
            writer.write("hello,world!");
            writer.newLine();
            writer.write("00111100111000");
            writer.newLine();
            writer.write("Bye!!!!!!!!!");
            writer.newLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        finally {
            writer.close();
        }
    }
}
